<script language="javascript">

var TestFixture = {
    test_button: function() {
	JSUnit_BindElement ("text");

	Assert.NotNull ("JSUnit_GetElement()", "text element exists");
	Assert.NotNull ("JSUnit_GetElement('button')", "button element exists");
	Assert.AreEqual ("you haven't clicked me...", "JSUnit_GetElement().innerHTML", "initial text");

	var button = JSUnit_GetElement ("button");
	JSUnit_Click(button);

	/* it's okay to put stuff after this JSUnit_Click call since
	 * we didn't call JSUnit_TestCausesPageLoad */

	Assert.AreEqual ("you clicked me!", "JSUnit_GetElement().innerHTML", "text after button click");
    }
};

</script>
